package book;

public class BookList {

    private Book[] books;
    private int usedSize = 3;
    public BookList(){
        this.books = new Book[10];
        this.books[0] = new Book("西游记","罗贯中",12,"小说");
        this.books[1] = new Book("人生的智慧","叔本华",18,"哲学");
        this.books[2] = new Book("三国演义","吴承恩",10,"小说");
    }

    public int getUsedSize() {
        return usedSize;
    }

    public void setUsedSize(int usedSize) {
        this.usedSize = usedSize;
    }

    public  Book getBook(int pos){
         return books[pos];
    }

    public void setBook(int pos,Book book ){
        books[pos] = book;
    }
    public Book[] getBooks(){
        return books;
    }


}
